feat: Add Intelliflex v2.2 flat CSV format support#1184
Merged
Conversation
Extends the SingleDatasetParser to handle the v2.2 Intelliflex export format which has 47 fixed columns (vs 7) and 11 metrics per analyte region (vs 3). Key changes: - Pattern-based analyte column detection (R##: RP# prefix) alongside the existing FIXED_INPUT_COLUMNS approach for backward compatibility - New metric words and section mappings: BACKGROUND, NET MEDIAN, NET NORMALIZED MEDIAN, REPLICATE %CV, ANALYTE NAME, REGION - Analyte columns renamed from region prefixes (R25: RP1) to real names (HPV6) using ANALYTE NAME metadata columns - REGION values used as bead identifiers in Units section - DILUTION column mapped to dilution factor setting - Per-well data (well type/status, acquisition times, event counts) captured in measurement custom info - Calibration, verification, and fluidics metadata from v2.2 header columns flows through to custom info - Intelliflex structure now passes header custom_info to metadata Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Reduces diff noise in existing test files by aligning key ordering with main, making the actual content changes easy to review. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
stephenworlow
approved these changes
Apr 20, 2026
3 tasks
nathan-stender
added a commit
that referenced
this pull request
Apr 22, 2026
## Summary - Real-world Intelliflex v2.2 CSV exports include a `--DOCUMENT SIGNATURE--` footer block (serial number, data signature hashes) that was missing from the test fixture added in #1184 - These footer rows lack a `WELL LOCATION` value, creating duplicate NaN index entries in the parsed DataFrames. When `Measurement.create` looks up a location, `df.loc[location]` returns a DataFrame instead of a Series, causing `pd.isna()` to crash with "truth value of a Series is ambiguous" - Fix: strip footer lines starting at `--DOCUMENT SIGNATURE--` before passing to `read_csv`, so pandas never sees them and dtype inference stays clean - Updated the v2.2 test CSV to include a representative document signature footer ## Test plan - [x] All 773 tests pass - [x] Lint + mypy clean - [x] Verified against real-world `CO026755_P5_INTELLIFLEX (1).csv` that previously crashed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
R##: RP#prefix) to distinguish analyte columns from fixed metadata columns, with backward-compatible fallback to theFIXED_INPUT_COLUMNSlist for older formatsANALYTE NAMEcolumns and region-based bead identifiers fromREGIONcolumnsData captured from v2.2 format
Files changed
src/allotropy/parsers/luminex_xponent/constants.py— New metric words and calculated data sectionssrc/allotropy/parsers/luminex_xponent/luminex_xponent_reader.py— ExtendedSingleDatasetParserwith pattern-based column detection, analyte renaming, section mappingssrc/allotropy/parsers/luminex_xponent/luminex_xponent_structure.py— Per-well metadata keys in count datasrc/allotropy/parsers/luminex_intelliflex/luminex_intelliflex_structure.py— Pass headercustom_infoto metadataTest plan
🤖 Generated with Claude Code